
const { defineConfig } = require('@vue/cli-service')
const segmentation = require('./public/configuration')
module.exports = defineConfig({
  transpileDependencies: true,
  //开启代理服务器
  lintOnSave: false,
  parallel: false,
  devServer: {
    port: 8081,
    proxy: {
      //此处写的是往哪发送后端请求
      //这时我只要向api/Deepfool发送请求就可以调用到Deepfool这个后端的函数了
      'api': {
        target: segmentation.subsystem, // 比如后端开的端口是8000
        ws: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      'images': {
        target: segmentation.uploadingip, // 比如后端开的端口是8000
        ws: true,
        pathRewrite: {
          '^/images': ''
        }
      }
    }
  }
})
